<?php
/*code here*/
if(Auth::hasAuth('current_user')){
    $this->view->current_user = Auth::getAuth('current_user');
}
else{
    header('location: /');
}
header('location: /error');
/*code here(end)*/
$this->setLayout();

 